import request from '@/utils/request'

export function listFormula(query) {
  return request({
    url: '/formula/list',
    method: 'get',
    params: query
  })
}

export function listAllFormula(query) {
  return request({
    url: '/formula/list-all',
    method: 'get',
    params: query
  })
}


export function copyFormula(query) {
  return request({
    url: '/formula/copy',
    method: 'get',
    params: query
  })
}


export function add(query) {
  return request({
    url: '/formula/add',
    method: 'post',
    params: query
  })
}

export function update(query) {
  return request({
    url: '/formula/update',
    method: 'put',
    params: query
  })
}

export function deleteById(query) {
  return request({
    url: '/formula/delete',
    method: 'delete',
    params: query
  })
}

export function addGoodsFormulaCorrelation(query) {
  return request({
    url: '/formula/addGoodsFormulaCorrelation',
    method: 'post',
    params: query
  })
}

export function unbundleGoodsFormulaCorrelation(query) {
  return request({
    url: '/formula/unbundleGoodsFormulaCorrelation',
    method: 'post',
    params: query
  })
}
export function listGoodsFormulaSpecifications(query) {
  return request({
    url: '/formula/listGoodsFormulaSpecifications',
    method: 'get',
    params: query
  })
}

export function getGoodsFormulaCorrelationDetails(query) {
  return request({
    url: '/formula/getGoodsFormulaCorrelationDetails',
    method: 'get',
    params: query
  })
}
